var frisby = require('frisby');

frisby.create('获取当周的计划任务')
  .post('http://192.168.247.88:9090/hub/flight/getTailTasksWeek', {
        'device-udid':'092700B6-2E6F-45D7-B55D-AEFACED48DDC',
        'StaffID':'1545'//登录人的员工id    不能为空
      })

    // .inspectJSON()
    .expectJSONTypes({
        'result': {
           "value": String,
           "FlightDatas": Array
         }})

    .expectJSONTypes('result.FlightDatas.?', {
          "id":String,//"航班id",
     			"arr_airport":String,//"降落机场",
     			"dept_airport":String,//"起飞机场",
     			"est_arr_time":String,//"预计到达时间",
     			"est_dept_time":String,//"预计起飞时间",
     			"flight_no":String,//"航班号",
     			"plan_arr_time":String,//"计划到达时间",
     			"plan_dept_time":String,//"计划起飞时间",
     			"real_arr_time":String,//"实际到达时间",
     			"real_dept_time":String,//"实际起飞时间",
     			"reserve_airport":String,//"备降机场",
     			"status_code":String,//"航班状态，状态分别是 ARR 落地,NDR 落地,ATA 到达,CNL 取消,DEL 延误,DEP 起飞, RTR 返航,SCH 计划",
     			"legno":String,//"航段编号",
     			"tri_fltid":String,//"其他地区的航班号",
     			"div_flag":String,//"备降标志",
     			"pax":String,//"实际PAX配置",
     			"book":String,//"等级的PAX标志",
     			"delay1":String,//"第一次延误代码",
     			"dur1":String,//"第一次延误时间",
     			"delay2":String,//"",
     			"dur2":String,//"",
     			"delay3":String,//"",
     			"dur3":String,//"",
     			"delay4":String,//"",
     			"dur4":String,//"",
     			"gate":String,//"登机门",
     			"stc":String,//"航班任务性质",
     			"orig_actyp":String,//"计划机型",
     			"actyp":String,//"实际机型",
     			"long_reg":String,//"长机号",
     			"depgate":String,//"起飞机场停机位",
     			"arrgate":String,//"目的机场停机位",
     			"datop":String,//"航班日期(UTC)",
     			"flightdate":String,//"航班日期(北京时间)",
     			"toff":String,//"实际离地时间",
     			"tdwn":String,//"实际落地时间",
     			"dept_airport_zh":String,//"起飞机场中文名称",
     			"arr_airport_zh":String,//"降落机场中文名称",
     			"captainName":String,//"机长名字，多个机长中间以逗号分割",
     			"captainId":String,//"机长员工id，多个机长中间以逗号分割",
     			"copilotName":String,//"副驾驶名字，多个副驾驶中间以逗号分割"
     			"flightdatacreatetime":String//"生成pdf文件的时间"
        })
    .expectStatus(200)
.toss();
